package com.qidian.mes.sys.controller;

import com.qidian.mes.pojo.OptionLog;
import com.qidian.mes.sys.service.OptionLogService;
import com.qidian.mes.util.dot.PagerDTO;
import com.qidian.mes.util.pojo.QdResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author 戴着假发的程序员
 * @Company 起点编程
 * @Description
 * @Time 2024/4/10 10:14
 */
@RestController
@CrossOrigin
@RequestMapping("/optionLog")
public class OptionLogController {
    @Autowired
    private OptionLogService optionLogService;
    @GetMapping("/queryByPage")
    public QdResult<PagerDTO> queryByPage(OptionLog log, Integer page, Integer limit) {
        return optionLogService.selectByPage(log, page, limit);
    }

    @GetMapping("/get")
    public QdResult<OptionLog> get(Long logId) {
        return optionLogService.queryById(logId);
    }
}
